﻿using System;
using System.Windows.Input;

namespace CardGenerator.ViewModel;

public class ClickCommand : ICommand
{
    private Action<Object?> _action;

    public ClickCommand(Action<Object?> action)
    {
        _action = action;
    }

    public bool CanExecute(object? parameter)
    {
        return true;
    }

    public void Execute(object? parameter)
    {
        this._action(parameter);
    }

    public event EventHandler? CanExecuteChanged;
}